-- GENERATED SPELL FOR [Khan Jehn] --


function spell0_5601(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_5601', 583, 1)
end

function spell1_5601(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5601', 8291, 1)
end

function spell2_5601(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(8380,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5601', 614, 1)
end

function Sorts_5601(pUnit, Event)
local choix_sorts_5601 = math.random(0, 2)
if choix_sorts_5601 == 0 then
pUnit:RegisterEvent('spell0_5601', 1, 1)
end
if choix_sorts_5601 == 1 then
pUnit:RegisterEvent('spell1_5601', 1, 1)
end
if choix_sorts_5601 == 2 then
pUnit:RegisterEvent('spell2_5601', 1, 1)
end
end

function mob5601_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5601', math.random(1500, 3000), 1)
end

function mob5601_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5601_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5601_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5601, 1, 'mob5601_Action')
RegisterUnitEvent(5601, 2, 'mob5601_Leave')
RegisterUnitEvent(5601, 3, 'mob5601_Kill')
RegisterUnitEvent(5601, 4, 'mob5601_Die')
